package com.outstudio.plan.op.svg;

import javax.xml.transform.TransformerException;

import org.w3c.dom.Document;

public class MainTest {

	public static void main(String[] args) {
		Document doc = JsonOp.trans("E:/svg/svg20160124.txt", "E:/svg/");
		try {
			SvgUtil.printSvg(doc);
		} catch (TransformerException e) {
			e.printStackTrace();
		}
		SvgUtil.outputSvgDocToPng(doc, "E:/svg/png0203.png");
	}

	public static void transPng(String svgSrcPath, String externalFilePath, String pngPath) {
		Document doc = JsonOp.trans(svgSrcPath, externalFilePath);
		try {
			SvgUtil.printSvg(doc);
		} catch (TransformerException e) {
			e.printStackTrace();
		}
		SvgUtil.outputSvgDocToPng(doc, pngPath);
	}

}
